{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/usr/local/envs/py3env/lib/python3.5/site-packages/sklearn/cross_validation.py:41: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.\n",
      "  \"This module will be removed in 0.20.\", DeprecationWarning)\n"
     ]
    }
   ],
   "source": [
    "import os\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "from data_prep import data_preprocessor\n",
    "import pickle\n",
    "import xgboost as xgb\n",
    "import warnings\n",
    "warnings.filterwarnings(\"ignore\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "pd.set_option(\"display.max_columns\", 40)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>mo</th>\n",
       "      <th>tp</th>\n",
       "      <th>dr</th>\n",
       "      <th>ln</th>\n",
       "      <th>lt</th>\n",
       "      <th>hd</th>\n",
       "      <th>sp</th>\n",
       "      <th>tm</th>\n",
       "      <th>mn</th>\n",
       "      <th>mt</th>\n",
       "      <th>mh</th>\n",
       "      <th>ml</th>\n",
       "      <th>mr</th>\n",
       "      <th>SpeedLimit</th>\n",
       "      <th>hdop</th>\n",
       "      <th>numsat</th>\n",
       "      <th>IMEI</th>\n",
       "      <th>trip_id</th>\n",
       "      <th>EVTmg</th>\n",
       "      <th>EVVer</th>\n",
       "      <th>...</th>\n",
       "      <th>EVMTR</th>\n",
       "      <th>EVODO</th>\n",
       "      <th>EVOAS</th>\n",
       "      <th>EVHTR</th>\n",
       "      <th>EVACE</th>\n",
       "      <th>EVTRE</th>\n",
       "      <th>EVCLC</th>\n",
       "      <th>EVBFN</th>\n",
       "      <th>EVIST</th>\n",
       "      <th>EVHTP_AVG</th>\n",
       "      <th>EVHTP_Max</th>\n",
       "      <th>EVHTP_Min</th>\n",
       "      <th>EVVBT</th>\n",
       "      <th>EVGSM</th>\n",
       "      <th>EVACO_X</th>\n",
       "      <th>EVACO_Y</th>\n",
       "      <th>EVACO_Z</th>\n",
       "      <th>Unnamed: 164</th>\n",
       "      <th>Driver name</th>\n",
       "      <th>No of persons</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>DEFREG:358272088699007</td>\n",
       "      <td>Trip not started</td>\n",
       "      <td>NaN</td>\n",
       "      <td>77.07333</td>\n",
       "      <td>28.49682</td>\n",
       "      <td>185.92</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1544412307420</td>\n",
       "      <td>77.07333</td>\n",
       "      <td>28.496819</td>\n",
       "      <td>267.1824</td>\n",
       "      <td>1104361859</td>\n",
       "      <td>5</td>\n",
       "      <td>30.0</td>\n",
       "      <td>2.4</td>\n",
       "      <td>4</td>\n",
       "      <td>358272088699007</td>\n",
       "      <td>Trip not started</td>\n",
       "      <td>P</td>\n",
       "      <td>M1_POCEV.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>3431</td>\n",
       "      <td>17.5</td>\n",
       "      <td>1</td>\n",
       "      <td>9.5</td>\n",
       "      <td>4.0</td>\n",
       "      <td>65</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>3880</td>\n",
       "      <td>3880</td>\n",
       "      <td>3880</td>\n",
       "      <td>140</td>\n",
       "      <td>0</td>\n",
       "      <td>657</td>\n",
       "      <td>814</td>\n",
       "      <td>7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>MOHIT</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>DEFREG:358272088699007</td>\n",
       "      <td>Trip not started</td>\n",
       "      <td>NaN</td>\n",
       "      <td>77.07333</td>\n",
       "      <td>28.49682</td>\n",
       "      <td>185.92</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1544412307520</td>\n",
       "      <td>77.07333</td>\n",
       "      <td>28.496819</td>\n",
       "      <td>267.1824</td>\n",
       "      <td>1104361859</td>\n",
       "      <td>5</td>\n",
       "      <td>30.0</td>\n",
       "      <td>2.4</td>\n",
       "      <td>4</td>\n",
       "      <td>358272088699007</td>\n",
       "      <td>Trip not started</td>\n",
       "      <td>P</td>\n",
       "      <td>M1_POCEV.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>3431</td>\n",
       "      <td>17.5</td>\n",
       "      <td>1</td>\n",
       "      <td>9.5</td>\n",
       "      <td>4.0</td>\n",
       "      <td>65</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>3880</td>\n",
       "      <td>3880</td>\n",
       "      <td>3880</td>\n",
       "      <td>140</td>\n",
       "      <td>0</td>\n",
       "      <td>657</td>\n",
       "      <td>814</td>\n",
       "      <td>7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>MOHIT</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>DEFREG:358272088699007</td>\n",
       "      <td>Trip not started</td>\n",
       "      <td>NaN</td>\n",
       "      <td>77.07333</td>\n",
       "      <td>28.49682</td>\n",
       "      <td>185.92</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1544412307620</td>\n",
       "      <td>77.07333</td>\n",
       "      <td>28.496819</td>\n",
       "      <td>267.1824</td>\n",
       "      <td>1104361859</td>\n",
       "      <td>5</td>\n",
       "      <td>30.0</td>\n",
       "      <td>2.4</td>\n",
       "      <td>4</td>\n",
       "      <td>358272088699007</td>\n",
       "      <td>Trip not started</td>\n",
       "      <td>P</td>\n",
       "      <td>M1_POCEV.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>3431</td>\n",
       "      <td>17.5</td>\n",
       "      <td>1</td>\n",
       "      <td>9.5</td>\n",
       "      <td>4.0</td>\n",
       "      <td>65</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>3880</td>\n",
       "      <td>3880</td>\n",
       "      <td>3880</td>\n",
       "      <td>140</td>\n",
       "      <td>0</td>\n",
       "      <td>657</td>\n",
       "      <td>814</td>\n",
       "      <td>7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>MOHIT</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>DEFREG:358272088699007</td>\n",
       "      <td>Trip not started</td>\n",
       "      <td>NaN</td>\n",
       "      <td>77.07333</td>\n",
       "      <td>28.49682</td>\n",
       "      <td>185.92</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1544412307720</td>\n",
       "      <td>77.07333</td>\n",
       "      <td>28.496819</td>\n",
       "      <td>267.1824</td>\n",
       "      <td>1104361859</td>\n",
       "      <td>5</td>\n",
       "      <td>30.0</td>\n",
       "      <td>2.4</td>\n",
       "      <td>4</td>\n",
       "      <td>358272088699007</td>\n",
       "      <td>Trip not started</td>\n",
       "      <td>P</td>\n",
       "      <td>M1_POCEV.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>3431</td>\n",
       "      <td>17.5</td>\n",
       "      <td>1</td>\n",
       "      <td>9.5</td>\n",
       "      <td>4.0</td>\n",
       "      <td>65</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>3880</td>\n",
       "      <td>3880</td>\n",
       "      <td>3880</td>\n",
       "      <td>140</td>\n",
       "      <td>0</td>\n",
       "      <td>657</td>\n",
       "      <td>814</td>\n",
       "      <td>7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>MOHIT</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>DEFREG:358272088699007</td>\n",
       "      <td>Trip not started</td>\n",
       "      <td>NaN</td>\n",
       "      <td>77.07333</td>\n",
       "      <td>28.49682</td>\n",
       "      <td>185.92</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1544412307820</td>\n",
       "      <td>77.07333</td>\n",
       "      <td>28.496819</td>\n",
       "      <td>267.1824</td>\n",
       "      <td>1104361859</td>\n",
       "      <td>5</td>\n",
       "      <td>30.0</td>\n",
       "      <td>2.4</td>\n",
       "      <td>4</td>\n",
       "      <td>358272088699007</td>\n",
       "      <td>Trip not started</td>\n",
       "      <td>P</td>\n",
       "      <td>M1_POCEV.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>3431</td>\n",
       "      <td>17.5</td>\n",
       "      <td>1</td>\n",
       "      <td>9.5</td>\n",
       "      <td>4.0</td>\n",
       "      <td>65</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>3880</td>\n",
       "      <td>3880</td>\n",
       "      <td>3880</td>\n",
       "      <td>140</td>\n",
       "      <td>0</td>\n",
       "      <td>657</td>\n",
       "      <td>814</td>\n",
       "      <td>7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>MOHIT</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 167 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                       mo                tp  dr        ln        lt      hd  \\\n",
       "0  DEFREG:358272088699007  Trip not started NaN  77.07333  28.49682  185.92   \n",
       "1  DEFREG:358272088699007  Trip not started NaN  77.07333  28.49682  185.92   \n",
       "2  DEFREG:358272088699007  Trip not started NaN  77.07333  28.49682  185.92   \n",
       "3  DEFREG:358272088699007  Trip not started NaN  77.07333  28.49682  185.92   \n",
       "4  DEFREG:358272088699007  Trip not started NaN  77.07333  28.49682  185.92   \n",
       "\n",
       "   sp             tm        mn         mt        mh          ml  mr  \\\n",
       "0 NaN  1544412307420  77.07333  28.496819  267.1824  1104361859   5   \n",
       "1 NaN  1544412307520  77.07333  28.496819  267.1824  1104361859   5   \n",
       "2 NaN  1544412307620  77.07333  28.496819  267.1824  1104361859   5   \n",
       "3 NaN  1544412307720  77.07333  28.496819  267.1824  1104361859   5   \n",
       "4 NaN  1544412307820  77.07333  28.496819  267.1824  1104361859   5   \n",
       "\n",
       "   SpeedLimit  hdop  numsat             IMEI           trip_id EVTmg  \\\n",
       "0        30.0   2.4       4  358272088699007  Trip not started     P   \n",
       "1        30.0   2.4       4  358272088699007  Trip not started     P   \n",
       "2        30.0   2.4       4  358272088699007  Trip not started     P   \n",
       "3        30.0   2.4       4  358272088699007  Trip not started     P   \n",
       "4        30.0   2.4       4  358272088699007  Trip not started     P   \n",
       "\n",
       "        EVVer      ...        EVMTR  EVODO  EVOAS  EVHTR  EVACE  EVTRE  EVCLC  \\\n",
       "0  M1_POCEV.0      ...            0   3431   17.5      1    9.5    4.0     65   \n",
       "1  M1_POCEV.0      ...            0   3431   17.5      1    9.5    4.0     65   \n",
       "2  M1_POCEV.0      ...            0   3431   17.5      1    9.5    4.0     65   \n",
       "3  M1_POCEV.0      ...            0   3431   17.5      1    9.5    4.0     65   \n",
       "4  M1_POCEV.0      ...            0   3431   17.5      1    9.5    4.0     65   \n",
       "\n",
       "   EVBFN  EVIST  EVHTP_AVG  EVHTP_Max  EVHTP_Min  EVVBT  EVGSM  EVACO_X  \\\n",
       "0      1      0       3880       3880       3880    140      0      657   \n",
       "1      1      0       3880       3880       3880    140      0      657   \n",
       "2      1      0       3880       3880       3880    140      0      657   \n",
       "3      1      0       3880       3880       3880    140      0      657   \n",
       "4      1      0       3880       3880       3880    140      0      657   \n",
       "\n",
       "   EVACO_Y  EVACO_Z  Unnamed: 164  Driver name  No of persons  \n",
       "0      814        7           NaN        MOHIT              1  \n",
       "1      814        7           NaN        MOHIT              1  \n",
       "2      814        7           NaN        MOHIT              1  \n",
       "3      814        7           NaN        MOHIT              1  \n",
       "4      814        7           NaN        MOHIT              1  \n",
       "\n",
       "[5 rows x 167 columns]"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#reading the data from google cloud storage\n",
    "\n",
    "import google.datalab.storage as storage\n",
    "import pandas as pd\n",
    "from io import BytesIO\n",
    "\n",
    "mybucket = storage.Bucket('msil_raw')\n",
    "data_csv = mybucket.object('training_data/TCU_DATA_1/358272088699007_2018-12-10_cb.csv')\n",
    "\n",
    "uri = data_csv.uri\n",
    "%gcs read --object $uri --variable data\n",
    "\n",
    "dataset = pd.read_csv(BytesIO(data))\n",
    "dataset.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {},
   "outputs": [],
   "source": [
    "df=data_preprocessor(dataset)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>IMEI</th>\n",
       "      <th>Year</th>\n",
       "      <th>Month</th>\n",
       "      <th>Day</th>\n",
       "      <th>Hour</th>\n",
       "      <th>Minute</th>\n",
       "      <th>Seconds</th>\n",
       "      <th>tp</th>\n",
       "      <th>sp</th>\n",
       "      <th>EVVSP</th>\n",
       "      <th>EVVSP_delta</th>\n",
       "      <th>EVVSP_change</th>\n",
       "      <th>EVGPO</th>\n",
       "      <th>EVOAS</th>\n",
       "      <th>EVIGM_Latest</th>\n",
       "      <th>EVCOM_Latest</th>\n",
       "      <th>EVACO_Z</th>\n",
       "      <th>EVIRT_Min</th>\n",
       "      <th>EVDI2</th>\n",
       "      <th>EVBMI_Latest</th>\n",
       "      <th>EVBMA_Latest</th>\n",
       "      <th>EVVAC</th>\n",
       "      <th>EVVAC_delta</th>\n",
       "      <th>EVVAC_change</th>\n",
       "      <th>EVODO</th>\n",
       "      <th>EVODOH</th>\n",
       "      <th>EVSMA_in</th>\n",
       "      <th>EVSMA_EWMA</th>\n",
       "      <th>EVSMA_delta</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>358272088699007</td>\n",
       "      <td>2018</td>\n",
       "      <td>12</td>\n",
       "      <td>10</td>\n",
       "      <td>3</td>\n",
       "      <td>25</td>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>10</td>\n",
       "      <td>17.5</td>\n",
       "      <td>13</td>\n",
       "      <td>13</td>\n",
       "      <td>7</td>\n",
       "      <td>-38</td>\n",
       "      <td>13</td>\n",
       "      <td>15.0</td>\n",
       "      <td>15.5</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3431</td>\n",
       "      <td>0.0</td>\n",
       "      <td>92.9</td>\n",
       "      <td>92.9</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>358272088699007</td>\n",
       "      <td>2018</td>\n",
       "      <td>12</td>\n",
       "      <td>10</td>\n",
       "      <td>3</td>\n",
       "      <td>25</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>1000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>10</td>\n",
       "      <td>17.5</td>\n",
       "      <td>13</td>\n",
       "      <td>13</td>\n",
       "      <td>10</td>\n",
       "      <td>-38</td>\n",
       "      <td>13</td>\n",
       "      <td>15.0</td>\n",
       "      <td>15.5</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3431</td>\n",
       "      <td>0.0</td>\n",
       "      <td>92.9</td>\n",
       "      <td>92.9</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>358272088699007</td>\n",
       "      <td>2018</td>\n",
       "      <td>12</td>\n",
       "      <td>10</td>\n",
       "      <td>3</td>\n",
       "      <td>25</td>\n",
       "      <td>9</td>\n",
       "      <td>1</td>\n",
       "      <td>2000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>10</td>\n",
       "      <td>17.5</td>\n",
       "      <td>13</td>\n",
       "      <td>13</td>\n",
       "      <td>8</td>\n",
       "      <td>-38</td>\n",
       "      <td>13</td>\n",
       "      <td>15.0</td>\n",
       "      <td>15.5</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3431</td>\n",
       "      <td>0.0</td>\n",
       "      <td>92.9</td>\n",
       "      <td>92.9</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>358272088699007</td>\n",
       "      <td>2018</td>\n",
       "      <td>12</td>\n",
       "      <td>10</td>\n",
       "      <td>3</td>\n",
       "      <td>25</td>\n",
       "      <td>10</td>\n",
       "      <td>1</td>\n",
       "      <td>3000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>10</td>\n",
       "      <td>17.5</td>\n",
       "      <td>13</td>\n",
       "      <td>13</td>\n",
       "      <td>11</td>\n",
       "      <td>-38</td>\n",
       "      <td>13</td>\n",
       "      <td>15.0</td>\n",
       "      <td>15.5</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3431</td>\n",
       "      <td>0.0</td>\n",
       "      <td>92.9</td>\n",
       "      <td>92.9</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>358272088699007</td>\n",
       "      <td>2018</td>\n",
       "      <td>12</td>\n",
       "      <td>10</td>\n",
       "      <td>3</td>\n",
       "      <td>25</td>\n",
       "      <td>11</td>\n",
       "      <td>1</td>\n",
       "      <td>4000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>10</td>\n",
       "      <td>17.5</td>\n",
       "      <td>13</td>\n",
       "      <td>13</td>\n",
       "      <td>0</td>\n",
       "      <td>-38</td>\n",
       "      <td>13</td>\n",
       "      <td>15.0</td>\n",
       "      <td>15.5</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3431</td>\n",
       "      <td>0.0</td>\n",
       "      <td>92.9</td>\n",
       "      <td>92.9</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              IMEI  Year  Month  Day  Hour  Minute  Seconds  tp    sp  EVVSP  \\\n",
       "0  358272088699007  2018     12   10     3      25        7   1     0    0.0   \n",
       "1  358272088699007  2018     12   10     3      25        8   1  1000    0.0   \n",
       "2  358272088699007  2018     12   10     3      25        9   1  2000    0.0   \n",
       "3  358272088699007  2018     12   10     3      25       10   1  3000    0.0   \n",
       "4  358272088699007  2018     12   10     3      25       11   1  4000    0.0   \n",
       "\n",
       "   EVVSP_delta  EVVSP_change  EVGPO  EVOAS  EVIGM_Latest  EVCOM_Latest  \\\n",
       "0          0.0           0.0     10   17.5            13            13   \n",
       "1          0.0           0.0     10   17.5            13            13   \n",
       "2          0.0           0.0     10   17.5            13            13   \n",
       "3          0.0           0.0     10   17.5            13            13   \n",
       "4          0.0           0.0     10   17.5            13            13   \n",
       "\n",
       "   EVACO_Z  EVIRT_Min  EVDI2  EVBMI_Latest  EVBMA_Latest  EVVAC  EVVAC_delta  \\\n",
       "0        7        -38     13          15.0          15.5    0.0          0.0   \n",
       "1       10        -38     13          15.0          15.5    0.0          0.0   \n",
       "2        8        -38     13          15.0          15.5    0.0          0.0   \n",
       "3       11        -38     13          15.0          15.5    0.0          0.0   \n",
       "4        0        -38     13          15.0          15.5    0.0          0.0   \n",
       "\n",
       "   EVVAC_change  EVODO  EVODOH  EVSMA_in  EVSMA_EWMA  EVSMA_delta  \n",
       "0           0.0   3431     0.0      92.9        92.9          0.0  \n",
       "1           0.0   3431     0.0      92.9        92.9          0.0  \n",
       "2           0.0   3431     0.0      92.9        92.9          0.0  \n",
       "3           0.0   3431     0.0      92.9        92.9          0.0  \n",
       "4           0.0   3431     0.0      92.9        92.9          0.0  "
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['IMEI', 'Year', 'Month', 'Day', 'Hour', 'Minute', 'Seconds', 'tp', 'sp',\n",
       "       'EVVSP', 'EVVSP_delta', 'EVVSP_change', 'EVGPO', 'EVOAS',\n",
       "       'EVIGM_Latest', 'EVCOM_Latest', 'EVACO_Z', 'EVIRT_Min', 'EVDI2',\n",
       "       'EVBMI_Latest', 'EVBMA_Latest', 'EVVAC', 'EVVAC_delta', 'EVVAC_change',\n",
       "       'EVODO', 'EVODOH', 'EVSMA_in', 'EVSMA_EWMA', 'EVSMA_delta'],\n",
       "      dtype='object')"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 2, 3, 4, 5, 6, 7, 8])"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.tp.unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {},
   "outputs": [],
   "source": [
    "trip_no=8"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {},
   "outputs": [],
   "source": [
    "test_trip = df[df[\"tp\"] == trip_no]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "metadata": {},
   "outputs": [],
   "source": [
    "sma_actual = test_trip[\"EVSMA_EWMA\"]\n",
    "\n",
    "\n",
    "x_test_trip = test_trip.drop(columns = [\"EVSMA_delta\",\"EVSMA_EWMA\", \"tp\",'IMEI'])\n",
    "y_test_trip = test_trip[\"EVSMA_delta\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "metadata": {},
   "outputs": [],
   "source": [
    "model_train= pickle.load(open('model_xgb_stack_2.pickle.dat','rb'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "metadata": {},
   "outputs": [],
   "source": [
    "dtest = xgb.DMatrix(x_test_trip)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_pred = model_train.predict(dtest)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "metadata": {},
   "outputs": [],
   "source": [
    "for i in range(0, len(y_pred)):\n",
    "  if y_pred[i]<0:\n",
    "    y_pred[i]=0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "7320"
      ]
     },
     "execution_count": 77,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(y_pred)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "metadata": {},
   "outputs": [],
   "source": [
    "# making a dataframe of actual and predicted values\n",
    "test_trip_df = pd.DataFrame({\n",
    "    \"y\": y_test_trip,\n",
    "    \"yhat\": y_pred\n",
    "})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "metadata": {},
   "outputs": [],
   "source": [
    "sma_absolute = test_trip[\"EVSMA_EWMA\"].iloc[0]\n",
    "sma_list = []\n",
    "for i in range(0, len(y_pred)):\n",
    "  temp_sma = sma_absolute - y_pred[i]\n",
    "  sma_list.append(temp_sma)\n",
    "  sma_absolute = temp_sma"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAEICAYAAABGaK+TAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3Xd4VFX+x/H3lPTeIIUO4dAJiDRFFARlBUFFFBusfX+r4q7dVdS1obuubXet6KKrgiIudkEQaVJDCRAOvQVI730m8/tjLhoxkACTzNzk+3oenuTeuXPnMzPhO2fOPfdci8vlQgghhPlYvR1ACCHE6ZECLoQQJiUFXAghTEoKuBBCmJQUcCGEMCkp4EIIYVJSwIUAlFJblVLne+Fxpyqllp/hPoYppbSnMgnzsHs7gPAtSqlQYAvwsNb6Q2NdGLAV+LPWeq6xbgDwOHAOYAEOA58Bf9da5yulpgIzgXJj11nA37TWrzUgQ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//BYopdYrpW411vnae94JyAbeVUptUEq9rZQK8cGcx1wNfGT87qsZf2aGAm6pY52vTuByoqxN8hyUUqHAp8DdWuuik2zqtZxaa6fxVbUN7hZp95M8ZpPnVEodO96xvtbqkz2eN9/zc7TW/XF/pf+jUuq8k2zrrZx2oD/wmta6H1DKL10RdfHa66mU8gcuBT6pZ1Ov/j+vzQwF/BDQttZyG+Cwl7Ick2l8ZcL4mWWsP1HWRn8OSik/3MX7A631PF/NeYzxNXoJ7j77SKXUsQPqtR/z5zzG7RG4u7MaM+c5wKXGAcLZuLtOXvKxjABorQ8bP7Nw99kOxPfe80PAIa31amN5Lu6C7ms5wf1BmKq1zjSWfTHjr5ihgK8FkpVSHY1PyKuBz72c6XNgivH7FGB+rfU3KKUsxsG5QuOr13fAaKVUlHFQY7SxziOMPteZQLrW+h8+nDPOGJGAUioIuBB3f/0PwMQT5DyWfyKwWGvtMtZfrZQKMEaHJANrPJFRa/2Q1rqN1roD7r+1xVrra30pI4BSKkQpFXbsd9zv1RZ87D3XWh8FDhojPcDdx7zN13IaJvNL98mxLL6W8Vd8fhih1tqhlLoD9wthA97RWm9tqsdXSn0EnA/EKqUO4T7KPAP4WCl1E3AAuNLY/GvcQ4t24T6S/XvjOeQppZ7E/WEE8Fet9fEHRs/EOcD1QJrRvwzwsA/mTABmGaMxrMDHWusvlVLbgNlKqaeADRgHvIyf7yulduFu1V5t5NyqlPoYdyFwAH/UWjs9mLMuD/hYxtbAZ0ZdtAMfaq2/VUqtxbfec4A7gQ+MBtge47GtvpRTKRUMjAJuq7Xa1/7//IbMBy6EECZlhi4UIYQQdZACLoQQJiUFXAghTEoKuBBCmJQUcCGEMCkp4EIIYVJSwIUQwqT+H6O15I/RYXNzAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f038504d1d0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(sma_list, label = \"prediction\")\n",
    "plt.plot(list(sma_actual), label = \"actual\")\n",
    "plt.title(\"XGB_02 Min Velocity\")\n",
    "plt.legend()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Error for the Trip = -5.59 %\n"
     ]
    }
   ],
   "source": [
    "err = (((sma_list[-1] - list(sma_actual)[-1])))/(list(sma_actual)[0] - list(sma_actual)[-1])\n",
    "print(\"Error for the Trip = {:.2f} %\".format(err * 100))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Copying file://model_xgb_stack_2.pickle.dat [Content-Type=application/octet-stream]...\n",
      "- [1 files][ 21.1 MiB/ 21.1 MiB]                                                \n",
      "Operation completed over 1 objects/21.1 MiB.                                     \n"
     ]
    }
   ],
   "source": [
    " !gsutil cp 'model_xgb_stack_2.pickle.dat' 'gs://msil_raw/training_data/model_xgb_stack_2.pickle.dat'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Copying file://scale_y.pickle.dat [Content-Type=application/octet-stream]...\n",
      "/ [1 files][  568.0 B/  568.0 B]                                                \n",
      "Operation completed over 1 objects/568.0 B.                                      \n"
     ]
    }
   ],
   "source": [
    " !gsutil cp 'scale_y.pickle.dat' 'gs://msil_raw/training_data/scale_y.pickle.dat'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
